import Vue from 'vue'
import VueRouter from "vue-router";

Vue.use(VueRouter);
let router= new VueRouter({
    routes: [
        {
            path: '/home',
            component: ()=>import('@/pages/Home')
        },
        {
            path: '/admin',
            component: ()=>import('@/pages/admin/Admin'),
            children:[
                {
                    path:'/emoji',
                    component: ()=>import('@/pages/admin/EmojiAdmin'),
                },
                {
                    path:'/tag',
                    component: ()=>import('@/pages/admin/TagAdmin'),
                }
            ]
        },
        {
            path: '*',
            redirect:'/home'
        },
        ],
    scrollBehavior (to, from, savedPosition) {
    return { x: 0, y: 0 }
}


})

export default router
